
import { TextHighlight as OriginalTextHighlight } from 'element-tiptap'
import CustomMenuButton from './MenuButton.vue'

export default class TextHighlight extends OriginalTextHighlight {

    constructor(option = {}) {
        super(option)
    }
    menuBtnView(editorContext) {
        return {
            component: CustomMenuButton,
            componentProps: {
                isActive: editorContext.isActive.text_highlight()
            },
            componentEvents: {
                change(e) {
                    editorContext.commands.text_highlight(e)
                }
            }
        };
    }
}